<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <!-- 引入 Bootstrap CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- 引入 Bootstrap Icons -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
  <title>管理员面板</title>
  <style>
    :root {
      --primary-color: #4361ee;
      --secondary-color: #3f37c9;
      --accent-color: #4895ef;
      --light-bg: #f8f9fa;
    }

    body {
      background-color: var(--light-bg);
      padding: 20px;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    .admin-container {
      max-width: 800px;
      margin: 0 auto;
      background-color: white;
      padding: 30px;
      border-radius: 12px;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    }

    .page-header {
      color: var(--primary-color);
      margin-bottom: 30px;
      padding-bottom: 15px;
      border-bottom: 2px solid #eaeaea;
      position: relative;
    }

    .page-header:after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 80px;
      height: 3px;
      background: var(--accent-color);
      border-radius: 3px;
    }

    .section-card {
      background: #ffffff;
      border-radius: 10px;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
      margin-bottom: 25px;
      border: none;
      overflow: hidden;
    }

    .card-header {
      background-color: #f9fafb;
      padding: 15px 20px;
      border-bottom: 1px solid #edf2f7;
      font-weight: 600;
      color: var(--secondary-color);
    }

    .card-body {
      padding: 25px;
    }

    .form-label {
      font-weight: 500;
      color: #4a5568;
      margin-bottom: 8px;
    }

    .btn-primary {
      background-color: var(--primary-color);
      border-color: var(--primary-color);
      padding: 8px 20px;
      font-weight: 500;
      transition: all 0.3s ease;
    }

    .btn-primary:hover {
      background-color: var(--secondary-color);
      border-color: var(--secondary-color);
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(67, 97, 238, 0.3);
    }

    .btn-secondary {
      background-color: #718096;
      border-color: #718096;
      padding: 8px 20px;
      font-weight: 500;
      transition: all 0.3s ease;
    }

    .btn-secondary:hover {
      background-color: #4a5568;
      border-color: #4a5568;
      transform: translateY(-2px);
    }

    .action-buttons {
      display: flex;
      gap: 15px;
      justify-content: flex-end;
      margin-top: 20px;
    }

    .form-control:focus {
      border-color: var(--accent-color);
      box-shadow: 0 0 0 0.25rem rgba(72, 149, 239, 0.25);
    }

    .icon-prefix {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: #a0aec0;
    }

    .input-with-icon {
      position: relative;
    }

    .input-with-icon input,
    .input-with-icon textarea {
      padding-left: 40px;
    }
  </style>
</head>
<body>
<div class="admin-container">
  <h1 class="page-header text-center">
    <i class="bi bi-speedometer2 me-2"></i>管理员面板
  </h1>

  <div class="section-card">
    <div class="card-header d-flex align-items-center">
      <i class="bi bi-megaphone me-2"></i>发布公告
    </div>
    <div class="card-body">
      <form action="publishNotice" method="post">
        <div class="mb-4">
          <label for="title" class="form-label">公告标题</label>
          <div class="input-with-icon">
            <i class="bi bi-card-heading icon-prefix"></i>
            <input type="text" class="form-control form-control-lg" id="title" name="title" placeholder="请输入公告标题">
          </div>
        </div>

        <div class="mb-4">
          <label for="content" class="form-label">公告内容</label>
          <div class="input-with-icon">
            <i class="bi bi-text-paragraph icon-prefix"></i>
            <textarea class="form-control" id="content" name="content" rows="6" placeholder="请输入公告详细内容"></textarea>
          </div>
        </div>

        <div class="action-buttons">
          <button type="submit" class="btn btn-primary">
            <i class="bi bi-send me-2"></i>发布公告
          </button>
        </div>
      </form>
    </div>
  </div>

  <div class="action-buttons">
    <button type="button" class="btn btn-secondary" onclick="window.location.href='resident?action=list'">
      <i class="bi bi-people me-2"></i>查看居民信息
    </button>
  </div>
</div>

<!-- 引入 Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>